<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
</head>

<body>
<div id="hello-vue" class="demo">
  <button v-on:click="lightOn =! lightOn"> on/off </button>  
  {{lightOn}}
  <div v-if="lightOn">111</div>
  <div v-else="lightOn">222</div>
</div>

<script>
const app =  Vue.createApp({
  data() {
    return {
      lightOn:true
  }
}
}).mount('#hello-vue')
</script>
</body>
</html>
